[Top] [Prev] [Next] [Bottom]
[Contents]
SaRegJsScripts
Registers a built-in data site callback function which will insert Java Script functions in a Sapphire server application at the specified data site in the HTML template.
#include "sajavasc.h"
int SaRegJsScripts(int kind, char* filename, char* site);
Argument
- kind
- Specifies which Java Script function(s) to print. Valid defined constants and the function they use to print are:
- SAJS_DATENOW - SaJavaDateFixNow()
- SAJS_FORMAT - SaJavaSimpleFormat()
- SAJS_NOEMPTYFLDS - SaJavaNoEmptyFields()
- SAJS_CREDIT - SaJavaCardCheck()
- SAJS_ZIP - SaJavaZipCheck()
- SAJS_SSN - SaJavaSsnCheck()
- SAJS_EMAIL - SaJavaValEmail()
- SAJS_STATE - SaJavaState()
- SAJS_LETTERS - SaJavaIsAllLetters()
- SAJS_DIGITS - SaJavaIsAllDigits()
- SAJS_NOBLANK - SaJavaIsFieldNotBlank()
- filename
- A string specifying the filepath name of an HTML template file. If non-null and not an empty string, this file will be "played", if it is not already on the "play" list. If NULL or an empty string, the site will still be registered, but can be overridden by a similar site name with a specified filename.
- site
- A string specifying the site name to register the site function callback on.
Return Values
Returns 1 on success. Returns 0, if site is either NULL or an empty string.
Registers a built-in data site callback function which will insert Java Script functions in a Sapphire server application at the specified data site in the HTML template. The parameter, kind, specifies which function(s) are inserted at the site.
The code fragment:
SaRegJsSrcipts(0, NULL, "JavaScripts");
will write a string to standard out which is equivalent to the contents of the file:
config\htmlstyle\Yjs.js
in the Sapphire distribution. This will only be written when the site, ##Sa_JavaScripts## is in the HTML template file.
SaJavaSsnCheck, SaJavaZipCheck, SaJavaCardCheck, SaJavaNoEmptyFields
SaJavaDateFixNow, SaJavaIsAllDigits, SaJavaIsAllLetters, SaJavaIsFieldNotBlank
SaJavaValEmail, SaJavaSimpleFormat, SaJavaState, SaPrintJsScripts
SaJavaCallFunc
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.